
#include-once

Func FindAppPath($AppName)

  For $i = 1 To 1000
	Local $var = RegEnumVal("HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache", $i)
	If @error <> 0 Then ExitLoop
	;EndIf
	;MsgBox(4096, "SubKey ", $var)
	If StringInStr($var,$AppName) > 0 Then
		Return $var
	EndIf
	
  Next
   Return ""
EndFunc


; in para $Winp is the window left and top point
;ABg is the area of the begin point and the AEnd if the end of the area to capture

Func  GetTXArea($WinP,$ABg,$AEnd)
	Dim $RArray[4]
	 $RArray[0]=$WinP[0]+$ABg[0]
	 $RArray[1]=$WinP[1]+$ABg[1]
	 $RArray[2]=$AEnd[0]-$ABg[0]
	 $RArray[3]=$AEnd[1]-$ABg[1]
	 Return $RArray
EndFunc
